package app

import "database/sql"

func (m *MDB) QueryValue(query string, args []any) (string, error) {
	var val string
	if err := m.DB.QueryRow(query, args...).Scan(&val); err != nil && err != sql.ErrNoRows {
		return "", err
	} else {
		return val, nil
	}
}
